package zhoufu.sz.sanxiao_check.config;

/**
 * Created by hyc on 16/5/11.
 */
public class Constant {
    public static final String T_KEY = "52bc45db045cb193012d37a538a9be61";
    private static String WEB_SERVICE = null;
    private static String HOST = null;
    private static boolean isEncrypt = false;
    private static String desKey = null;
    public static final String KEY_SID = "key_sid";
    public static String KEY_TITLE = "key_title";
    public static String UPDATE_URL;

    /**
     * 初始化请求API
     *
     * @param webServiceUrl 请求URL
     * @param isEncrypt     是否加密
     * @param desKey        加密密钥
     */
    public static void init(String host, String webServiceUrl, boolean isEncrypt, String desKey) {
        WEB_SERVICE = webServiceUrl;
        Constant.isEncrypt = isEncrypt;
        Constant.desKey = desKey;
        UPDATE_URL = host + "/apk/version.xml";
        HOST = host;
    }

    public static String getDesKey() {
        return desKey;
    }

    public static boolean isEncrypt() {
        return isEncrypt;
    }

    public static String getWebService() {
        return HOST + WEB_SERVICE;
    }

    public static String getHOST() {
        return HOST;
    }

    public static class MainType {
        public static final String ACTION_KEY = "Action_key";
        public static final int ACTION_PERSON_CENTER = 0x110;//个人中心
        public static final int ACTION_IN_BASIC_MESSAGE = 0x111;//消防安全网格化责任登记表
    }
}
